import { defHttp } from '/@/utils/http/axios'

enum Api {
  CATEGORY_WT_INFO = '/category/getWtCategory',
  CATEGORY_GROUP_WT_INFO = '/category/getWtGroupCategory',
  CHILDREN_INFO = '/get_asin_order_num',
  PRODUCT_INFO = '/category/getCategoryProduct',
  CATEGORY_CHILDREN = '/category/getCategoryChildren',
  CATEGORY_GROUP_CHILDREN = '/category/getCategoryGroupChildren',
}

// Get personal center-basic settings

export const categoryWtApi = (categoryParams) =>
  defHttp.post<void>({ url: Api.CATEGORY_WT_INFO, params: categoryParams })

export const categoryGroupWtApi = (categoryParams) =>
  defHttp.post<void>({ url: Api.CATEGORY_GROUP_WT_INFO, params: categoryParams })

export const getChildren = (params) =>
  defHttp.post<void>({ url: Api.CHILDREN_INFO, params: params })

export const getCategoryChildren = (params) =>
  defHttp.post<void>({ url: Api.CATEGORY_CHILDREN, params: params })

export const getCategoryGroupChildren = (params) =>
  defHttp.post<void>({ url: Api.CATEGORY_GROUP_CHILDREN, params: params })

export const getCategoryProduct = (params) =>
  defHttp.post<void>({ url: Api.PRODUCT_INFO, params: params })
